package data_class

//解构声明 和实体类
fun main(args: Array<String>) {
    val pair = Pair(1, "DAS")
    val (first, second) = pair
    println("first:$first second:$second")
}

class Pair<out K, out V>(val first: K, val second: V) {
    operator fun component1(): K {
        return first
    }

    operator fun component2(): V {
        return second
    }
}